package com.android.aircondition.service;

public class Temperature {
	
	public static final String UNIT_C = "UNIT_C";
	public static final String UNIT_F = "UNIT_C";
	public static final String C_UNIT = "C_UNIT";
	
	private float unit_C;
	private float unit_F;
	private boolean unit_key;
	
	
	public boolean iscUnitKey() {
		return unit_key;
	}
	public void setcUnit(boolean unit_key) {
		this.unit_key = unit_key;
	}
	public float getUnit_C() {
		return unit_C;
	}
	public void setUnit_C(float unitC) {
		unit_C = unitC;
		unit_F = (unitC*1.8f)+32;
	}
	public float getUnit_F() {
		return unit_F;
	}
	public void setUnit_F(float unitF) {
		unit_F = unitF;
		unit_C = (unitF-32)/1.8f;
		
		if(unitF < 61){
			this.unit_F = 61;
		}
		
		if(unitF > 86){
			this.unit_F = 86;
		}
		
		if(unitF == 61){
			unit_C = 16.0f;
		}
		
		if(unitF== 86){
			unit_C = 30.f;
		}
	}
	
}
